package truedano.truedano;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.*;

public class MyIntent extends Activity {
	EditText send;
	Button gotoPage;
	TextView showText;
	
	private void setListener(){
		gotoPage.setOnClickListener(new Button.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				/*Bundle bundle = new Bundle();
				Intent intent = new Intent(MyIntent.this,MyIntentNext.class);
				
				bundle.putString("truedano", send.getText().toString());
				intent.putExtras(bundle);
				startActivity(intent);*/
				Intent intent = new Intent(MyIntent.this,MyIntentNext.class);
				intent.putExtra("truedano", send.getText().toString());
				startActivity(intent);
				
				new MyUtil().ToastShow(getApplicationContext(), "startActivity()");
			}
		});
	}
	
	private void setView(){
		send = (EditText)findViewById(R.id.send);
		gotoPage = (Button)findViewById(R.id.gotoPage);
		showText = (TextView)findViewById(R.id.showText);
		
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_intent);
		setView();
		setListener();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.my_intent, menu);
		return true;
	}
}
